Imports System.Web
Imports System.Web.SessionState
Imports System.Security.Principal
Imports System.Data.SqlClient
Imports System.Web.Security
Imports NENAData.NENAMember
Imports renew.FunctionsPublic
Imports renew.Security

Partial Class Login
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
        'SetFocus(txtUserName)
    End Sub

    Private Sub Login1_LoginError(ByVal sender As Object, ByVal e As System.EventArgs) Handles Login1.LoginError
        Dim oNenaData As NENAMember = New NENAMember
        Dim oMember = oNenaData.GetMember(Login1.UserName)
        If oMember Is Nothing Then
            Login1.FailureText = "Incorrect user name. <br /> Your membership may need to be updated. <br /> " & _
                "<a href='http://membership.nena.ca/disclaimer.aspx'>Use this link</a> to have your account updated. <br />"
            '"Select the '<a href='http://membership.nena.ca/disclaimer.aspx'>Apply for NENA Membership</a>' link to have your account created."
        Else
            Login1.FailureText = "You password is incorrect, please try again. <br /> " & _
                "Or use the <b>'I forgot my Password'</b> link below."
        End If
    End Sub
End Class